package cn.zyy.hotel.dao;

import cn.zyy.hotel.entity.RoomType;
import cn.zyy.hotel.vo.RoomTypeVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoomTypeMapper {

    //查询房型列表
    List<RoomType> selectRoomTypeList(RoomTypeVO roomTypeVo);

    //添加房型
    int addRoomType(RoomType roomType);

    //修改房型
    int updateRoomType(RoomType roomType);

    //查询当前房型下是否存在房间
    int getRoomCountByRoomTypeId(Integer roomTypeId);

    //删除房型
    int deleteById(Integer id);

    //根据房型Id查询房型信息
    @Select("select * from t_room_type where id = #{roomTypeId}")
    RoomType selectById(Integer roomTypeId);

}
